//
//  SportSeletButtonCVCell.m
//  FitTime
//
//  Created by 赵建平 on 16/3/31.
//  Copyright © 2016年 赵建平. All rights reserved.
//

#import "SportSeletButtonCVCell.h"

@implementation SportSeletButtonCVCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        self.jpImageView = [[UIImageView alloc] initWithFrame:CGRectZero];
        self.jpImageView.layer.borderWidth = 1;
        self.jpImageView.layer.borderColor = [UIColor grayColor].CGColor;
        self.jpImageView.layer.masksToBounds = YES;
        self.jpImageView.layer.cornerRadius = 21;
                [self.contentView addSubview:self.jpImageView];
        
        self.titleLabel = [[UILabel alloc] initWithFrame:CGRectZero];
        self.titleLabel.font = [UIFont systemFontOfSize:14];
        self.titleLabel.textAlignment = NSTextAlignmentCenter;
        [self.contentView addSubview:self.titleLabel];
    
    
    }
    return self;
}

- (void)layoutSubviews {
    [super layoutSubviews];
    [self.jpImageView mas_makeConstraints:^(MASConstraintMaker *make) {
    
        make.centerX.equalTo(self.contentView.mas_centerX);
        make.centerY.equalTo(self.contentView.mas_centerY).offset(-20);
        make.width.equalTo(@42);
        make.height.equalTo(@42);
    }];
    
    [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
    
        make.top.equalTo(self.jpImageView.mas_bottom);
        make.centerX.equalTo(self.jpImageView.mas_centerX);
        make.height.equalTo(@20);
        make.left.equalTo(self.contentView.mas_left);
        
    }];
    
    
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
